<?php
return array (
		
		/**
		 * session
		 */
		'session' => array (
				'sessionName' => '_site' 
		), 
		
		/**
		 * memcache
		 */
		'memcache' => array (
				'class' => 'CMemCache',  // 'useMemcached'=>true,
				'servers' => array (
						array (
								'host' => 'localhost', 
								'port' => 11211, 
								'weight' => 60 
						) 
				) 
		), 
		
		/**
		 *
		 * @var WebUser
		 */
		'user' => array (
				'class' => 'WebUser', 
				'stateKeyPrefix' => 'sitestar_', 
				// enable cookie-based authentication
				'allowAutoLogin' => true, 
				'loginUrl' => '/login' 
		), 
		
		/**
		 * urlManager
		 * enable URLs in path-format
		 */
		'urlManager' => array (
				'urlFormat' => 'path', 
				'showScriptName' => false, 
				'urlSuffix' => '.html', 
				'rules' => require ROOT_DIR . '/protected/config/urlrules.php' 
		), 
		
		/**
		 * clientScript
		 */
		'clientScript' => array (
				'scriptMap' => array(
		        /*'jquery.js'=>'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js',
				'jquery.min.js'=>'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js',*/
		    ), 
				'coreScriptPosition' => 2, 
				'coreScriptUrl' => WEB_URL . '/assets/common' 
		), 
		
		/**
		 * assetManager
		 */
		'assetManager' => array (
				'baseUrl' => WEB_URL . '/assets/common', 
				'basePath' => 'assets/common' 
		), 
		
		/**
		 * widgetFactory
		 */
		'widgetFactory' => array (
				'widgets' => array (
						'CListView' => array (
								// 默认css、js文件路径
								'baseScriptUrl' => WEB_URL . '/assets/listview' 
						), 
						'CDetailView' => array (
								// 默认css、js文件路径
								'baseScriptUrl' => WEB_URL . '/assets/detailview' 
						), 
						'CTreeView' => array (
								// 默认css、js文件路径
								'baseScriptUrl' => WEB_URL . '/assets/treeview' 
						) 
				) 
		), 
		
		/**
		 * cache
		 */
		'cache' => array (
				'class' => 'CDbCache' 
		), 
		
		/**
		 * db
		 */
		'db' => array (
				'connectionString' => 'mysql:host=localhost;dbname=app_sitestar001', 
				// 'connectionString' => 'sqlite:' . dirname ( __FILE__ ) . '/../data/blog.db',
				'emulatePrepare' => true, 
				'username' => 'root', 
				'password' => '', 
				'charset' => 'utf8', 
				'tablePrefix' => 'tbl_', 
				'enableParamLogging' => true, 
				'schemaCachingDuration' => 8640000 
		), 
		
		/**
		 * errorHandler
		 */
		'errorHandler' => array ( // use 'site/error' action to display errors
				'errorAction' => 'site/error' 
		), 
		
		/**
		 * log
		 */
		'log' => array (
				'class' => 'CLogRouter', 
				'routes' => array (
						
						array (
								'class' => 'CFileLogRoute', 
								'levels' => 'error, warning' 
						), 
						
						array (
								'class' => 'CWebLogRoute', 
								'levels' => 'Trace' 
						), 
						
						array (
								'class' => 'CFileLogRoute', 
								'levels' => 'trace,log', 
								'categories' => 'system.db.CDbCommand', 
								'logFile' => 'db.log' 
						) 
				) 
		) 
);


